package org.example.petadoption.service.impl;

import org.example.petadoption.entity.Orders;
import org.example.petadoption.entity.OrdersUserProductDTO;
import org.example.petadoption.mapper.OrdersMapper;
import org.example.petadoption.service.IOrdersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单表 服务实现类
 * </p>
 *
 * @author PetAdoption
 * @since 2025-10-20
 */
@Service
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements IOrdersService {

    @Autowired
    private OrdersMapper ordersMapper;

    @Override
    public List<OrdersUserProductDTO> getOrdersByMerchant(int merchantId) {
        return ordersMapper.selectOrdersByMerchant(merchantId);
    }

}
